package dipl.algorithm.utility.data.comparator;

/**
 * Represents a comparator. All classes implementing this interface
 * can be used to compare objects of a class.
 * Important: Comparators must be stateless.
 * @author Marko Walther
 * @param <C> class of objects to compare
 */
public interface IComparator<C> {

	/**
	 * compares given two objects.
	 * @param a one comparable
	 * @param b another comparable
	 * @return 	-1 if a is smaller than b,
	 * 			0 if a is equal to b,
	 * 			1 if a is greater than b
	 */
	public int compare( C a, C b );
}
